package asia.doing.mapper;

import asia.doing.entity.Comment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommentMapper {
    int insert(Comment comment);

    int deleteById(Long id);

    int updateById(Comment comment);

    Comment selectById(Long id);

    @Select("select count(*) from comment where fid = #{fid} and module = #{module}")
    Long selectCount(@Param("fid") Long fid, @Param("module") String module);

    List<Comment> selectAll(Comment comment);
}
